package com.ijunfu.spring.applicationContext._01_autowired;

import com.ijunfu.spring.applicationContext._01_autowired.config.AppConfig;
import com.ijunfu.spring.applicationContext._01_autowired.service.UserService;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 *
 * @Title  : 
 * @Author : ijunfu <ijunfu@163.com>
 * @Date   : 2023/11/11 10:25
 * @Version: 1.0
 * @Motto  : 世界很大 世界很小
 *
 */
//@SpringBootApplication
public class _01Main {

    public static void main(String[] args) {
//        SpringApplication.run(_01Main.class);

        AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(AppConfig.class);

        UserService service = context.getBean(UserService.class);

        service.print();
        service.print();
        service.print();
    }
}
